Step 1 - Prepare the nodes in your project

In this step of the tutorial you create tags and filters to prepare the nodes in your project for progressive rendering across several frames.

Assets for the tutorial

The starting point of this tutorial is the Progressive rendering.kzproj Kanzi Studio project file stored in the <KanziWorkspace>/Tutorials/Progressive rendering/Start directory.

The <KanziWorkspace>/Tutorials/Progressive rendering/Completed directory contains the completed Kanzi Studio project of this tutorial.

The starting point project contains the content you need to complete this tutorial:

Prepare the nodes for progressive rendering

In this section you create Tag Filter resources to collect the nodes that you want to render in different render passes. In the next step of the tutorial you use these filters in render passes to distribute the rendering of the nodes across several frames.

In the starting project of this tutorial the content of the Car Model node is already split into parts: Pass 1 Models, Pass 2 Models, and Car Shadow. When you prepare your own content for progressive rendering, to ensure stable framerate, distribute the rendering into even parts among the render passes used by a Progressive Rendering Viewport 2D node. To distribute the rendering into even parts make sure that each render pass renders:

To prepare the nodes for progressive rendering:

  1. In Kanzi Studio open the project stored in the <KanziWorkspace>/Tutorials/Progressive rendering/Start directory.
  2. Tag the nodes that you want to render in different frames:
    1. In the Prefabs > Car Scene > Car Model select the Pass 1 Models node and in the Properties set the Tags property to Pass 1.
      The Pass 1 Models node groups the nodes which contain the models for the car interior, tires, and windows.
      When you tag a node, the descendant nodes of that node inherit the tag.
    2. In the Prefabs > Car Scene > Car Model select the Pass 2 Models node and in the Properties set the Tags property to Pass 2.
    3. In the Prefabs > Car Scene select the Car Shadow node and in the Properties set the Tags property to Pass 3.
    4. In the Prefabs > Car Scene select the Lights node, in the Properties click the Tags button next to the Tags property, and select Pass 1, Pass 2, and Pass 3.
      Kanzi filters lights in the same way it filters other nodes. When you create a filter that only includes a specific tag, the lights that light the tagged nodes are included in the filter only when you add the tag to those light nodes.
  3. Create a Tag Filter which collects the nodes for the first pass of rendering:
    1. In the Library > Rendering press Alt and right-click Object Sources, select Tag Filter, and name it Filter Pass 1.
      Tag Filter collects 3D nodes that have a specific tag assigned.
    2. In the Properties set the Included Tags property to the Pass 1 tag.
      You set the Filter Pass 1 tag filter to collect the Pass 1 Models and Lights nodes that have the Pass 1 tag. Because nodes inherit tags from their parent nodes, this filter collects all descendant nodes of the Pass 1 Models and Lights nodes.
      You use this filter in the next step of this tutorial to collect for rendering the nodes that show the interior, tire and window models, and the light nodes.
  4. Repeat the previous step to:

< INTRODUCTION
NEXT STEP >

See also

To learn more about how you can use filters in your Kanzi application, see Filters.

To learn more about how to use tags in Kanzi Studio, see Using tags.